package com.one.odf.config;

import com.one.odf.service.OdfService;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.xml.ws.Endpoint;


/**
 * @description: ws配置
 * @author: zero
 * @date: 2019/10/28
 */
@Configuration
public class WebServiceConfig{
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private Bus bus;

    @Autowired
    private OdfService odfService;

    @Bean
    public Endpoint endpoint(){
        EndpointImpl endpoint = new EndpointImpl(bus, odfService);
        endpoint.publish("/odfService");
        return endpoint;
    }

}
